export const getFileType=(url)=>{
    const fileType = url?.match(/\.([^.]+)$/)[1];
    const imgFile=['jpg','jpeg','png','gif']
    const openFile=['txt','pdf','doc','docx','xls','xlsx','ppt','pptx']
    if (imgFile.includes(fileType)) {
        return 0
    }else if (openFile.includes(fileType)) {
        return 1
    }else{
        return -1
    }
}